<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<%@ taglib prefix="s" uri="http://stripes.sourceforge.net/stripes.tld" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsp/jstl/fmt" %>

<%
    if (session.getAttribute("loggedIn") != null) 
    {
        if (((Boolean) session.getAttribute("loggedIn"))) 
        {
            if (session.getAttribute("role").equals("courier")) 
            {
                response.sendRedirect("courier_shipments.jsp");
            } 
            else if (!session.getAttribute("role").equals("admin")) 
            {
                response.sendRedirect("index.jsp");
            }
        } else {
            response.sendRedirect("index.jsp");
        }
    } else {
        response.sendRedirect("index.jsp");
    }
%>

<s:layout-render name="/managerlayout.jsp" headline="Delivery Service">
    <s:layout-component name="body">
    </s:layout-component>
       </s:layout-render>
